<!-- php:$comment = phpok('_comment','tid='.$tid.'&pageid='.$get.pageid,'psize=10','orderby=desc') -->
<div class="card rounded-0 border-left-0 border-right-0 border-bottom-0">
	<div class="card-header">
		提交新评论<!-- if $comment.total -->，当前已有 {$comment.total} 条评论<!-- /if -->
	</div>
	<div class="card-body">
		<form method="post" id="comment-post">
			<input type="hidden" name="tid" value="{$tid ? $tid : $rs.id}" />
			<input type="hidden" name="vtype" value="{$vtype ? $vtype : 'title'}" />
			<!-- if $comment.uid -->
			<div class="form-group">{func form_edit comment $comment.content editor width=100%&height=150&btns[image]=1}</div>
			<!-- else -->
			<div class="form-group">
				<textarea class="form-control" rows="5" name="comment" id="comment" placeholder="填写评论信息" style="resize: none;"></textarea>
			</div>
			<div class="form-group clearfix">
				{func form_edit pictures $comment.res upload is_multiple=1}
			</div>
			<!-- /if -->
			<!-- if $is_vcode -->
			<div class="form-group">
				<div class="row">
				<div class="col-sm-3"><input class="form-control"  type="text" name="_chkcode" id="_chkcode" placeholder="请填写验证码" /></div>
				<div class="col-sm-2"><img src="" border="0" align="absmiddle" id="vcode" class="hand" /></div>
				</div>
			</div>
			<script type="text/javascript">
			$(document).ready(function(){
				$("#vcode").phpok_vcode();
				$("#vcode").click(function(){
					$(this).phpok_vcode();
				});
			});
			</script>
			<!-- /if -->
			<div class="form-group d-block mt-4">
				<input name="" type="submit" class="btn btn-primary" value="提交" />
			</div>
		</form>
	</div>
</div>
<!-- loop from=$comment.rslist key=$key value=$value id=tmpid -->
<div class="card mt-2">
	<div class="card-header">
		<a href="{url ctrl=user id=$value.uid.id/}" target="_blank" class="am-comment-author">{$value.uid.user}</a>评论于<time>{func time_format $value.addtime}</time>
	</div>
	<div class="card-body">
		<p class="card-text">{$value.content}</p>
		<!-- if $value.res -->
		<div class="row row-cols-1 row-cols-sm-2 row-cols-md-4">
			<!-- loop from=$value.res key=$k value=$v id=$idxx -->
			<div class="col p-2"><a href="{$v.gd.auto}" target="_blank"><img src="{$v.gd.thumb}" alt="{$v.title}" class="rounded" style="max-width:100%" /></a></div>
			<!-- /loop -->
		</div>
		<!-- /if -->
		<!-- loop from=$value.adm_reply key=$k value=$v id=$idxx -->
		<fieldset class="admin-reply">
			<legend>管理员于 <time>{func time_format $v.addtime}</time> 回复</legend>
			<div class="content">{$v.content}</div>
		</fieldset>
		<!-- /loop -->
	</div>
</div>
<!-- /loop -->
<section class="container">
	<div class="m-4"><!-- include tpl=block/pagelist pageurl=$rs.url total=$comment.total pageid=$comment.pageid psize=$comment.$psize --></div>
</section>